package com.wlp.common.exception;
/**
 * 
 * @author wlp
 * @date 2024/04/24 10:48
 **/

import com.wlp.common.constant.ApiResponseCode;

/**
 * c处理异常
 * @Author: wlp
 * @Date: 2024/4/24 10:48
 * @return: null
 **/
public class BaseException extends RuntimeException{
    private static final long serialVersionUID = 2612992235262400823L;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    private Integer code = null;

    public BaseException(String message) {
        super(message);
        this.code = ApiResponseCode.SERVICE_ERROR.getCode();
    }

    public BaseException(String message, Throwable t) {
        super(message, t);
        this.code = ApiResponseCode.SERVICE_ERROR.getCode();
    }

    public BaseException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public BaseException(Integer code, String message, Throwable t) {
        super(message, t);
        this.code = code;
    }
}
